${widget("common/header")}
<@libMacro.datatables tableTools="false" colVis="false" />
<script>

   var scripts = [null, null]
   $('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	   
   });
	var operFlag="";//事件标识
     $(function(){	
    	 
    	   $( "#authStartTime" ).datepicker({
 			  showOtherMonths: true,
 			  selectOtherMonths: false,
 			  dateFormat:'yy-mm-dd',
 		   });
    	 
    	   $( "#authEndTime" ).datepicker({
 			  showOtherMonths: true,
 			  selectOtherMonths: false,
 			  dateFormat:'yy-mm-dd',
 		   });
			
			//查询列表
		  	$("#queryAuth").click(function(){
		  		var authParams = $("#auth_info_form").serialize();
		  		$("#authListIframe").show();
		  		$("#authDetailIframe").hide();
		  		$("#authListIframe").load("${ctx}/auth/list.do",authParams);
		  	});
			
		    //清空查询条件
			$("#resetVal").click(function(){
				$("#startTimes").val("");
				$("#endTimes").val("");
				$("#authStatuss").val("");
			});
			
			//申请新增
			$("#addAuth").click(function(){
		  		$("#authDetailIframe").show();
		  		$("#authDetailIframe").load("${ctx}/auth/addAuth.do");
		  		$("#authDetailIframe").dialog("open");
			});
			
			$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
				_title: function(title) {
					var $title = this.options.title || '&nbsp;'
					if( ("title_html" in this.options) && this.options.title_html == true )
						title.html($title);
					else title.text($title);
				}
			}));  
			
			//我的申请信息
			$('#authDetailIframe').dialog({
				hide:false,
				autoOpen:false,
				width: 650,
				height:550,
				modal:true,
				//bgiframe:true,
				title: "<div class='widget-header'><h4 class='smaller'><i class='ace-icon fa fa-cog green'></i>&nbsp; 转授权信息</h4></div>",
				title_html: true,
				buttons: [
				            
							{
								id: "btnAModify",
								html: "<i class='ace-icon fa fa-pencil-square-o bigger-110'></i>&nbsp; 修改",
								"class" : "btn btn-primary btn-minier",
								click: function() {
									modify();
								}
							},
							{
								id: "btnASave",
								html: "<i class='ace-icon fa fa-floppy-o bigger-110'></i>&nbsp; 保存",
								"class" : "btn btn-success btn-minier",
								click: function() {
									save();
								}
							},
							{
								id: "btnADelete",
								html: "<i class='ace-icon fa fa-trash-o bigger-110'></i>&nbsp; 删除",
								"class" : "btn btn-danger btn-minier",
								click: function() {
									remove();
								}
							},
							{
								id: "btnACancle",
								html: "<i class='ace-icon fa fa-undo bigger-110'></i>&nbsp; 取消",
								"class" : "btn btn-warning btn-minier",
								click: function() {
									cancle();
								}
							},												
							{
								id: "btnAClose",
								html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; 关闭",
								"class" : "btn btn-minier",
								click: function() {
									$(this).dialog("close");
								}
							}				
						]
					});
		});
		
   //时间控件
		
		
</script>

<div class="row">	
<div class="col-xs-12">

		<form id="auth_info_form" name="auth_info_form">
		<div class="row" >
		
		     <div class="form-group col-xs-4">
					<label class="col-sm-3 control-label no-padding-left" for="authStartTime">起始日期：</label>
					<div class="col-sm-9">
						<input type="text" id="authStartTime" name="authStartTime"  />
					</div>
			 </div>
			 
			 <div class="form-group col-xs-4">
					<label class="col-sm-3 control-label no-padding-left" for="authEndTime">结束日期：</label>
					<div class="col-sm-9">
						<input type="text" id="authEndTime" name="authEndTime"  />
					</div>
			 </div>
			 
			 <div class="form-group col-xs-4">
					<label class="col-sm-3 control-label no-padding-left" for="authStatus">授权状态：</label>
					<div class="col-sm-9">					
					<select class="col-xs-10 col-sm-8" id="authStatuss" name="authStatus">
					      <@libMacro.dictOptions dictType="D00042" currentValue="" />
						</select>
					</div>
			</div>
			
		</div>
			
				<div class="clearfix form-actions">
				  <div class="col-md-offset-4 col-md-8">
					<button class="btn btn-info no-padding-center" type="button" id="addAuth">
						<i class="icon-on-right ace-icon fa fa-plus bigger-110"></i>
						新增
					</button>
					&nbsp; &nbsp; &nbsp;
					<button class="btn btn-info no-padding-center" type="button" id="queryAuth">
						<i class="icon-on-right ace-icon fa fa-search bigger-110"></i>
						查询
					</button>
					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="reset" id="resetVal">
						<i class="ace-icon fa fa-undo bigger-110"></i>
						重置
					</button>
					</div>
				</div>
		</form>
		
	</div>
			</div>
	<div id="authListIframe"></div>	
	<br>
	<div id="authDetailIframe"></div>